﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<TemplateWeb.Models.ViewModels.GroupViewModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Revenue
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent1" runat="server">
    <span class="AdminTitle" style="color:#cc0000;">Doanh thu Management</span>
	(<a href="<%= Url.Action("Index", "Home") %>" class="AdminPageText">
		<%= WebConfiguration.SiteName  %>
	</a>|
	<a href="<%= Url.Action("LogOff", "Account") %>" class="AdminPageText">
		LogOut
	</a>)
	<br />
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent2" runat="server">
    <span class="AdminPageText">
    <% if(Model.DonDatHangModel != null)
       {
           var total = 0.0;
           foreach (var order in Model.DonDatHangModel.GetModel.LstObjModel)
           {
               foreach (var detail in order.ChiTietDonDatHang)
               {
                   total += (detail.SoLuong.Value * detail.Gia.Value);
               }
           }
    %>
        Tổng doanh thu: <span id="lblDoanhThu" style="font-weight: bold; color: Red"><%= string.Format("{0:0,0}", total)%> Đ</span>
        <br />
        <br />
        <div id="PartialDiv">
		    <% Html.RenderPartial("Templates/TH_EditOrders", Model); %>
	    </div>
    <% } %>
    </span>
</asp:Content>
